import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';

/// 认证事件
abstract class AuthenticationEvent extends Equatable {

  const AuthenticationEvent();

  @override
  List<Object> get props => [];

}

/// APP 启动事件
class AppStarted extends AuthenticationEvent {}

/// APP 登录事件
class LoggedIn extends AuthenticationEvent {
  
  final String token;

  const LoggedIn({@required this.token});

  @override
  List<Object> get props => [token];

  @override
  String toString() => "LoggedIn { token: $token }";
}

/// APP 退出登录事件
class LoggedOut extends AuthenticationEvent {}